﻿package com.zouloux.core.events 
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author ZoulouX
	 */
	public class RemoteEvent extends Event 
	{
		public static const CALL		:String 		= "call";
		public static const RESPONSE	:String 		= "response";
		public static const ERROR		:String 		= "error";
		
		public var message				:String 		= "";
		public var cause				:uint 			= 0;
		public var serviceName			:String			= "";
		public var data					:*;
		
		public function RemoteEvent (type:String, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
		} 
		
		public override function clone ():Event 
		{ 
			return new RemoteEvent(type, bubbles, cancelable);
		} 
		
		public override function toString ():String 
		{ 
			return formatToString("RemoteEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}	
	}
}